
#ifndef DisplayModeCollection_h
#define DisplayModeCollection_h

#include <Defines.h>
#include <CSharpPropertyMethods.h>

// Riccsson includes.
#include <System/Object.h>
#include <System/Collections/Generic/IEnumerable.h>
#include <System/Collections/Generic/List.h>

// XNA includes.
#include "DisplayMode.h"

namespace Riccsson
{
	namespace Xna
	{
		namespace Framework
		{
			namespace Graphics
			{
				class DisplayModeCollection
					: public Riccsson::System::Object
					, public Riccsson::System::Collections::Generic::IEnumerable<GC_PTR<DisplayMode>>
					//, IEnumerable
				{
				public:
					using IEnumerable<GC_PTR<DisplayMode>>::begin;
					//using IEnumerable::cbegin;
					using IEnumerable<GC_PTR<DisplayMode>>::end;
					//using IEnumerable::cend;

					private: GC_PTR<Riccsson::System::Collections::Generic::List<GC_PTR<DisplayMode>>> modes;
        
					public: GC_PTR<IEnumerable<GC_PTR<DisplayMode>>> operator[] (SurfaceFormat format)
					{
						//GC_PTR<Riccsson::System::Collections::Generic::List<GC_PTR<DisplayMode>>> list = new Riccsson::System::Collections::Generic::List<GC_PTR<DisplayMode>>();
						//foreach (GC_PTR<DisplayMode> mode : *this->modes.get())
						//{
						//	if (mode->Format == format)
						//	{
						//		list->Add(mode);
						//	}
						//}
						//return list.get();
						throw;
					}

					public: Riccsson::System::Collections::Generic::IEnumerator<GC_PTR<DisplayMode>>* GetEnumerator()
					{
						return modes->GetEnumerator();
					}

					public: override int GetHashCode()
					{
						throw Riccsson::System::NotImplementedException();
					}

					//Riccsson::System::Collections::Generic::IEnumerator* IEnumerable.GetEnumerator()
					//{
					//	throw Riccsson::System::NotImplementedException();
					//}
        
					public: DisplayModeCollection(GC_PTR<Riccsson::System::Collections::Generic::List<GC_PTR<DisplayMode>>> setmodes)
					{
						modes = setmodes;
					}
				};
			}
		}
	}
}

#endif